
<link rel="stylesheet" type="text/css" href="../addons/jy_yushou/css/swiper.min.css">
<link rel="stylesheet" type="text/css" href="../addons/jy_yushou/css/common.css?v=3">
<div class="fui-page seckill-page">
    <div class="fui-content">
        <input type="hidden" id="currenttime" value="{{currenttime}}" />
        <div class="swiper-container time-container">
            <div class="swiper-wrapper">
                <div ng-repeat="(key,time) in pagedata.times" class="swiper-slide time-slide time-slide-{{time.id}}" ng-class="{'current':time.status==0 || pagedata.timeindex==key}"  data-index="{{key}}">
                    <span class="time">{{time.time}}:00</span>
                    <span ng-if="time.status==1" class="text">               
                        预售中
					</span>
					<span ng-if="time.status==0" class="text">               
                        即将开始
					</span> 
					<span ng-if="time.status!=1 && time.status!=0" class="text">               
                        已预售
					</span> 
                </div>
            </div>
         </div>
        <div class="swiper-container adv-container" style="margin:0;">
            <div class="swiper-wrapper">           
                <div ng-repeat="adv in pagedata.pluginset.hdps" class="swiper-slide adv-slide" style="width:100%;padding:0">
                    <a ng-click="access_json(adv.url)">
                        <img ng-src="{{tomedia(adv.picurl)}}"/>
                    </a>
                </div>
				<div ng-if="!pagedata.pluginset.hdps ||  pagedata.pluginset.hdps.length<1" class="swiper-slide adv-slide" style="padding:0;width:100%">
                    <a>
                        <img src="../addons/jy_yushou/css/hdp.jpg"/>
                    </a>
                </div>
            </div>
        </div>
        <div ng-if="pagedata.rooms!='' && pagedata.rooms!=null" class="swiper-container room-container">
            <div class="swiper-wrapper">
                <a ng-repeat="room in pagedata.rooms" class="external swiper-slide room-slide" style="padding:0.5rem 0" ng-class="{'selected':pagedata.roomid==room.id}" ng-click="tool.get_list('jy_yushou/room//roomid='+room.id+'&timeid='+pagedata.timeid,true);pagedata.roomid=room.id">
                    {{room.title}}
                </a>
            </div>
        </div>
        <div ng-if="pagedata.roomid" class="swiper-container goods-container">
            <div class="swiper-wrapper">
                <div  class="swiper-slide goods-slide">
					<div class="fui-list-group time-group-{{pagedata.times[pagedata.timeindex].id}}" style="margin-top:0px">
						<div class="fui-list-group-title red">						   
							 <span ng-if="pagedata.times[pagedata.timeindex].status!=-1" class="timer" ng-init="tool.time_down(pagedata.times[pagedata.timeindex].rest_time)">
								  {{pagedata.times[pagedata.timeindex].status==0?'距开始':'距结束'}} <span class="time-hour">{{pagedata.times[pagedata.timeindex].rest_time.hour}}</span>:<span class="time-min">{{pagedata.times[pagedata.timeindex].rest_time.minute}}</span>:<span class="time-sec">{{pagedata.times[pagedata.timeindex].rest_time.second}}</span>
							 </span>
							<div ng-if="pagedata.times[pagedata.timeindex].status==-1">还可以继续预售哦~</div>
							<div ng-if="pagedata.times[pagedata.timeindex].status==1">预售中 先下单先得哦</div>
							<div ng-if="pagedata.times[pagedata.timeindex].status==0">即将开始 先下单先得哦</div>
						</div>
					</div>
                </div>               
            </div>
        </div>
		<div ng-if="pagedata.list" class="page-goods-detail fui-goods-group block" style="padding:0">
			<div ng-repeat="item in pagedata.list" class="fui-goods-item content-group" style="background:#fff;width:100%;">
				<div class="merchname subtitle c" style="line-height:1rem">本商品由{{item.merchname || '自营平台'}}专供</div>
				<div href="javascript:" ng-click="access_json('jy_weishop/goods.detail//id='+item.goodsid)" ng-if="!item.video || pagedata.shopset.no_video==1" ng-class="{'image':1, 'echelon':'预售'}" data-text="预售" style="position: relative;height:10rem;padding-bottom:0;background: url('{{tomedia(item.image) ||'../core/resource/images/nopic.jpg'}}') no-repeat 50%;background-size: cover;">
					<div ng-show="item.total <=0" class="salez" style="background-image: url('{{tomedia(pagedata.shopset.shop.saleout)}}'); "></div>
				</div>
				<div ng-if="item.video && pagedata.shopset.no_video !=1" class="image" style="position: relative;height:10rem;padding-bottom:0;">
					 <video id="my-video" class="video-js vjs-fluid" style="width:100%;height:100%;object-fit:fill" x5-playsinline="" playsinline=""
					  poster="{{tomedia(item.image) || '../core/resource/images/nopic.jpg'}}"
					  data-setup='{"controls": true, "autoplay": false}'>
					  <source src="{{tomedia(item.video)}}" type="video/mp4">					 
					</video>
				</div>
				<div ng-if="pagedata.times[pagedata.timeindex].rest_time" ng-class="{'seckill-container':1,'notstart':pagedata.times[pagedata.timeindex].status==0}">
					<div class="fui-list seckill-list" style="" >
						<div class="fui-list-media seckill-price">
							&yen;<span>{{item.price}}</span>
						</div>
						<div class="fui-list-inner">
								<div ng-if="item.tag" class="text">
									<span class="stitle" style="white-space:nowrap; overflow:hidden; max-width:2.6rem;">{{item.tag}}</span>
								</div>
							<div class="text"><span class="oldprice">&yen;{{item.oldprice}}</span></div>
						</div>
					</div>
					<div class="fui-list seckill-list1" >
						<div class="fui-list-inner">
							<div class="text " ng-if="pagedata.times[pagedata.timeindex].status==1">已出售 {{item.percent || 0}}%</div>
							<div class="text " ng-if="pagedata.times[pagedata.timeindex].status==1"><span class="process"><div class="inner" style="width:{{item.percent || 0}}%"></div></span></div>
						</div>
					</div>
					<div class="fui-list seckill-list2" style="" >
						<div class="fui-list-inner">
							<div ng-if="pagedata.times[pagedata.timeindex].status!=1" class="text ">距开始还有</div>
							<div ng-if="pagedata.times[pagedata.timeindex].status==1" class="text ">距结束还有</div>
							<div class="text timer" ng-init="tool.time_down(pagedata.times[pagedata.timeindex].rest_time)">
									<span class="time-hour">{{pagedata.times[pagedata.timeindex].rest_time.hour}}</span> <span class="time-min">{{pagedata.times[pagedata.timeindex].rest_time.minute}}</span> <span class="time-sec">{{pagedata.times[pagedata.timeindex].rest_time.second}}</span>
							</div>
						</div>
					</div>
				</div>
				<div class="detail">
					<div class="name fui-list-group" style="height:auto;" href="javascript:" ng-click="access_json('jy_weishop/goods.detail//id='+item.goodsid)">
						<div class="fui-list jump" style="padding:0.2rem 0">
							<div class="fui-list-inner" style="border-right: 2px solid #efefef;">
								<div class="title bold"><i ng-show="item.active.title" class="fui-tag fui-tag-danger">{{item.title}}</i> {{item.title}}</div>
							</div>
						   <div class="fui-list-media" style="width:3.6rem;text-align:center;padding-left:0.5rem">
								<div class="fui-list-inner">
									<div class="num bold" style="font-size:0.8rem;color:#da7b5f">{{item.likes}}</div>
									<div class="subtitle">关注人数</div>
							   </div>
						   </div>
						</div>
					</div>
					<div class="saletime" style="padding-top:0.5rem;margin-top: 0.3rem;border-top: 1px solid #efefef;">
						<div>
							<span ng-if="item.sendday" style="color:#f60">发货时间：<span class="red">{{item.sendday}}</span> 天后</span>
							<span ng-if="!item.sendday" style="color:#f60">发货时间：常规发货</span>
						</div>
					</div>
					<div class="price" style="margin-top: 0.3rem;">
						<span class="text">￥<span style="font-size:1rem">{{item.price}}</span> /{{item.unit || '件'}} <span class="delete" style="font-size:0.7rem;font-weight:400">原价:￥{{item.oldprice || item.originalprice}}</span></span>
						<span ng-if="pagedata.times[pagedata.timeindex].status!=1" href="javascript:" ng-click="access_json('jy_weishop/goods.detail//id='+item.goodsid)" class="jylabel jylabel-red active" style="padding:0.1rem 0.6rem;border-radius:1rem;font-weight:400">等待预售</span>
						<span ng-if="pagedata.times[pagedata.timeindex].status==1 && item.percent>=100" href="javascript:"  ng-click="access_json('jy_weishop/goods.detail//id='+item.goodsid)" class="jylabel jylabel-red active" style="padding:0.1rem 0.6rem;border-radius:1rem;font-weight:400">已抢空</span>
						<span ng-if="pagedata.times[pagedata.timeindex].status==1 && item.percent<100" href="javascript:" ng-click="post({'goodsid':item.goodsid},'jy_weishop/goods.detail/addtocart/')" class="jylabel jylabel-red active" style="padding:0.1rem 0.6rem;border-radius:1rem;font-weight:400">加入购物车</span>
					</div>
					<div ng-if="item.members.length>0" href="javascript:" ng-click="access_json('jy_weishop/goods.detail//id='+item.goodsid)" class="fui-cell-group" style="border-top: 1px solid #efefef;">
						<div class="fui-cell" style="padding:0.5rem 0" ng-click="pagedata.gotoitem(item);">
							<div class="fui-cell-info" style="width:9rem">
								<img ng-repeat="m in item.members" class="avatar" style="margin-right:-0.5rem" ng-src="{{tomedia(m.avatar) || '../core/resource/images/nopic.jpg'}}">
								<img ng-if="item.members.length>5" class="avatar" style="margin-right:-0.5rem" src="../addons/jy_weishop/resource/images/avatar-more.jpg">
								<span class="text" style="margin-left:1rem;color: #999;">等关注了此预售商品</span>
							</div>
							<div class="fui-cell-remark"></div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div ng-if="!pagedata.list || pagedata.list.length<1" class='content-empty' style="margin-top:0">
			<i class='icon icon-xinxi'></i><br/>当前时间段没有任何预售商品
		</div>
		<div ng-if="!pagedata.list || pagedata.list.length<1" class="content-empty" style="margin-top:1rem;">
			<a href="javascript:;" ng-click="access_json(pagedata.current_plugin+'/index/')" class='btn btn-sm btn-danger-o external' style="border-radius: 100px;width:  7rem;font-size: .75rem">去首页逛逛吧</a>
		</div>
		<div ng-if="pagedata.list.length>0" class="content-empty" style="margin-top:1rem;">
			<a href="javascript:;" ng-click="access_json('jy_weishop/member.cart/')" class='btn btn-sm btn-danger-o external' style="border-radius: 100px;width:  7rem;font-size: .75rem"><span ng-if="pagedata.cartnums>0" class="badge" style="top:-0.8rem;left:5rem">{{pagedata.cartnums}}</span>看看购物车</a>
		</div>
    </div>
</div>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<script>
scope.tool.get_list('jy_yushou/room//roomid='+scope.pagedata.roomid+'&timeid='+scope.pagedata.timeid,true);
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
</script>